function ajax(url,fnwin,fnfaild){
	//创建ajax对象
	var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP")
	//建立连接
	xhr.open("GET",url,true)
	//发送请求
	xhr.send()
	//接受数据
	xhr.onreadystatechange = function(){
		if(xhr.readyState == 4){
			if(xhr.status == 200){
				if(typeof fnwin == "function"){
					fnwin(xhr.responseText)
				}
			}else{
				if(typeof fnfaild == "function"){
					fnfaild()
				}
			}
		}
	}
}
  